// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';//引入路由
import './utils/permission';//引入权限过滤
import i18n from './locales/i18n';//引入i18n
import store from './store';//引入store
import ElementUI from 'element-ui';//引入ElementUI
import 'element-ui/lib/theme-chalk/index.css';//引入ElementUI样式
import {getRequest, postRequest} from './utils/http';
import Print from 'vue-print-nb';


//引入高德地图及配置
import VueAMap from 'vue-amap';

Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
  key: '2c9623b1e3c739d0a23d578853d592a3', // 高德key
  plugin: [
    "AMap.Autocomplete", //输入提示插件
    "AMap.PlaceSearch", //POI搜索插件
    "AMap.Scale", //右下角缩略图插件 比例尺
    "AMap.OverView", //地图鹰眼插件
    "AMap.ToolBar", //地图工具条
    "AMap.MapType", //类别切换控件，实现默认图层与卫星图、实施交通图层之间切换的控制
    "AMap.PolyEditor", //编辑 折线多，边形
    "AMap.CircleEditor", //圆形编辑器插件
    "AMap.Geolocation", //定位控件，用来获取和展示用户主机所在的经纬度位置
  ],//依赖配置，根据自己的需求引入
  v: '1.4.4',
  uiVersion: "1.0"
});






import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'


Vue.prototype.getRequest = getRequest;//http get请求
Vue.prototype.postRequest = postRequest;//http post请求
Vue.use(ElementUI);
Vue.use(Print); // 注册
Vue.config.productionTip = false;
Vue.use(Viewer)



router.afterEach((to, from, next) => {
  window.scrollTo(0, 0);
});


new Vue({
  el: '#app',
  router,
  store,//使用store
  i18n,//使用i18n
  components: {App},
  template: '<App/>'
});
